﻿/*
 * patient的业务逻辑层
 * */
using System;
using System.Collections.Generic;
using System.Text;
using WH.NurseSys.DAL;
using WH.NurseSys.Model;

namespace WH.NurseSys.BLL
{
    public class PatientBLL
    {
        PatientDAL patientDAL = new PatientDAL();

        public bool Insert(Patient patient)
        {
            return patientDAL.Insert(patient);
        }

        public bool Delete(Guid id)
        {
            return patientDAL.Delete(id);
        }

        //获取科室所有病人的列表
        public List<Patient> GetListByDept(Guid deptId)
        {
            return patientDAL.GetListByDept(deptId);
        }

        //获取科室的在院病人列表
        public List<Patient> GetInListByDept(Guid deptId)
        {
            return patientDAL.GetInListByDept(deptId);
        }

        public List<Patient> GetList()
        {
            return patientDAL.GetList();
        }

        public bool Update(Patient patient)
        {
            return patientDAL.Update(patient);
        }

        public Patient GetById(Guid id)
        {
            return patientDAL.GetById(id);
        }

        //按检索条件进行分页检索病人列表
        public List<Patient> GePagedQueryList(int pageIndex, int pageSize, PatientSearchArg searchArg)
        {
            return patientDAL.GePagedQueryList(pageIndex, pageSize, searchArg);
        }

        //获取符合检索条件的记录行数
        public int GetQueryCount(PatientSearchArg searchArg)
        {
            return patientDAL.GetQueryCount(searchArg);
        }
    }
}
